
import java.util.ArrayList;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ProspectiveGuest.java
 *
 * Created on Dec 13, 2011, 1:58:32 AM
 */

/**
 *
 * @author dabeast23
 */
public class ProspectiveGuest extends javax.swing.JFrame {

    /** Creates new form ProspectiveGuest */
    public ProspectiveGuest() {
        setResizable(false);
	setTitle("Hotel Kiosk: Prospective Guest");
	setDefaultCloseOperation(this.EXIT_ON_CLOSE);
        initComponents();
        this.setLocationRelativeTo(null);
    }
    
    public ProspectiveGuest(ArrayList<Reservation> reservationList) {
        setResizable(false);
	setTitle("Hotel Kiosk: Prospective Guest");
	setDefaultCloseOperation(this.EXIT_ON_CLOSE);
        initComponents();
        this.reservationList = reservationList;
        this.setLocationRelativeTo(null);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        backgroundPanel = new javax.swing.JPanel();
        hotelInformationButton = new javax.swing.JButton();
        hotelLayoutButton = new javax.swing.JButton();
        roomRequestButton = new javax.swing.JButton();
        separator = new javax.swing.JSeparator();
        prospectiveGuestLabel = new javax.swing.JLabel();
        backButton = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        backgroundPanel.setBackground(new java.awt.Color(102, 0, 0));

        hotelInformationButton.setBackground(new java.awt.Color(255, 255, 204));
        hotelInformationButton.setFont(new java.awt.Font("Comic Sans MS", 0, 18)); // NOI18N
        hotelInformationButton.setForeground(new java.awt.Color(102, 0, 0));
        hotelInformationButton.setText("Hotel Information");
        hotelInformationButton.setBorder(null);
        hotelInformationButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                hotelInformationButtonActionPerformed(evt);
            }
        });

        hotelLayoutButton.setBackground(new java.awt.Color(255, 255, 204));
        hotelLayoutButton.setFont(new java.awt.Font("Comic Sans MS", 0, 18));
        hotelLayoutButton.setForeground(new java.awt.Color(102, 0, 0));
        hotelLayoutButton.setText("Hotel Layout");
        hotelLayoutButton.setBorder(null);
        hotelLayoutButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                hotelLayoutButtonActionPerformed(evt);
            }
        });

        roomRequestButton.setBackground(new java.awt.Color(255, 255, 204));
        roomRequestButton.setFont(new java.awt.Font("Comic Sans MS", 0, 18));
        roomRequestButton.setForeground(new java.awt.Color(102, 0, 0));
        roomRequestButton.setText("Request A Room");
        roomRequestButton.setBorder(null);
        roomRequestButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                roomRequestButtonActionPerformed(evt);
            }
        });

        separator.setForeground(new java.awt.Color(255, 255, 204));

        prospectiveGuestLabel.setFont(new java.awt.Font("Tahoma", 1, 24));
        prospectiveGuestLabel.setForeground(new java.awt.Color(255, 255, 204));
        prospectiveGuestLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        prospectiveGuestLabel.setText("Prospective Guest");

        backButton.setBackground(new java.awt.Color(255, 255, 204));
        backButton.setFont(new java.awt.Font("Comic Sans MS", 0, 11));
        backButton.setForeground(new java.awt.Color(255, 255, 255));
        backButton.setText("Back");
        backButton.setContentAreaFilled(false);
        backButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                backButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout backgroundPanelLayout = new javax.swing.GroupLayout(backgroundPanel);
        backgroundPanel.setLayout(backgroundPanelLayout);
        backgroundPanelLayout.setHorizontalGroup(
            backgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, backgroundPanelLayout.createSequentialGroup()
                .addContainerGap(333, Short.MAX_VALUE)
                .addComponent(backButton)
                .addContainerGap())
            .addGroup(backgroundPanelLayout.createSequentialGroup()
                .addGap(144, 144, 144)
                .addComponent(separator, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(145, Short.MAX_VALUE))
            .addGroup(backgroundPanelLayout.createSequentialGroup()
                .addGap(89, 89, 89)
                .addGroup(backgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(hotelLayoutButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(hotelInformationButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(prospectiveGuestLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(95, Short.MAX_VALUE))
            .addGroup(backgroundPanelLayout.createSequentialGroup()
                .addGap(113, 113, 113)
                .addComponent(roomRequestButton, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(116, Short.MAX_VALUE))
        );
        backgroundPanelLayout.setVerticalGroup(
            backgroundPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, backgroundPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(prospectiveGuestLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 39, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addComponent(hotelInformationButton, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(hotelLayoutButton, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(44, 44, 44)
                .addComponent(separator, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(26, 26, 26)
                .addComponent(roomRequestButton, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(7, 7, 7)
                .addComponent(backButton)
                .addGap(11, 11, 11))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(backgroundPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(backgroundPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void hotelInformationButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hotelInformationButtonActionPerformed
        HotelInformationScreen HIS = new HotelInformationScreen(this, true,reservationList);
        HIS.setVisible(true);
        this.setVisible(false);
    }//GEN-LAST:event_hotelInformationButtonActionPerformed

    private void hotelLayoutButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hotelLayoutButtonActionPerformed
        HotelLayout HL = new HotelLayout(reservationList);
        HL.setVisible(true);
        this.setVisible(false);
    }//GEN-LAST:event_hotelLayoutButtonActionPerformed

    private void roomRequestButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_roomRequestButtonActionPerformed
        RequestARoom RAR = new RequestARoom(reservationList);
        RAR.setVisible(true);
        this.setVisible(false);
    }//GEN-LAST:event_roomRequestButtonActionPerformed

    private void backButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backButtonActionPerformed
        ChooseUserScreen CUS = new ChooseUserScreen(reservationList);
        CUS.setVisible(true);
        this.setVisible(false);
    }//GEN-LAST:event_backButtonActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ProspectiveGuest().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton backButton;
    private javax.swing.JPanel backgroundPanel;
    private javax.swing.JButton hotelInformationButton;
    private javax.swing.JButton hotelLayoutButton;
    private javax.swing.JLabel prospectiveGuestLabel;
    private javax.swing.JButton roomRequestButton;
    private javax.swing.JSeparator separator;
    // End of variables declaration//GEN-END:variables

    private ArrayList <Reservation> reservationList;
}
